package com.yh.ldzl.controller;

import com.yh.ldzl.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/home")
public class HomeController {
    @Autowired
    private HomeService homeService;

    @GetMapping("/selectPlanCompletionRate")
    public int selectPlanCompletionRate()
    {
        return homeService.selectPlanCompletionRate();
    }
    @GetMapping("/selectSteelCoil")
    public int selectSteelCoil()
    {
        return homeService.selectSteelCoil();
    }
    @GetMapping("/selectAbnormalNumber")
    public int selectAbnormalNumber()
    {
        return homeService.selectAbnormalNumber();
    }
    @GetMapping("/selectProductionProductTracking")
    public List<Map<String, Object>> selectProductionProductTracking()
    {
        return homeService.selectProductionProductTracking();
    }
    @GetMapping("/selectSbEquipmentEnable")
    public int selectSbEquipmentEnable()
    {
        return homeService.selectSbEquipmentEnable();
    }
    //折线图
    @GetMapping("/LineChart")
    public List<Map<String, Object>> LineChart()
    {
        return homeService.LineChart();
    }
    //饼图
    @GetMapping("/PieChart")
    public List<Map<String, Object>> PieChart()
    {
        return homeService.PieChart();
    }


}
